<?php
  require_once('inc_admin.php');
  //连接数据库		
  connect();

 /* if(!empty($_FILES["pic"]["name"])){
  	$pic = uploadfile('pic',UserPhotoPath,array('jpg','gif','png'));
  }
  else{
  	$pic='';
  }*/

  $data = array(
		'videoname' => trim($_POST['videoname'])
  	);

  //执行SQL语句
	$result = add('videos',$data);

  if(!$result){
  	echo "添加失败！<br/>";
  	echo "<a href='videoForm.html'>返回</a>";	  
  }else{	  
 	  redirect('VTList.php','添加成功！');
  }    
  
?>